﻿@using Microsoft.Web.Helpers

@model System.Int32

@if (Model > 0)
{
    using (Html.BeginForm("UploadFiles", "Admin", FormMethod.Post, new { @enctype = "multipart/form-data" }))
{
    @Html.Hidden("idAlbum", Model)
    <table class="table">
        <tbody>
            <tr class="tr" style="background: #eee; border: none">
                <td class="td" style="width: 60%; float: left; font-weight: bold; margin-top: 15px;
                    font-size: 16px; padding-left: 15px">
                    Ảnh  (kích thước tối đa 760x450 pixel - dung lượng dưới 100k)
                </td>
                <td class="td" style="width: 5%; float: left; margin-top: 8px">
                </td>
                <td class="td" style="width: 5%; float: left; margin-top: 8px">
                </td>
                <td class="td" style="width: 22%; float: right; margin-top: 8px">
                </td>
            </tr>

            <tr class="tr" style="background: #eee; border: none">
                <td class="td" style="width: 10%; float: left;">
                    &nbsp;
                </td>
                <td class="td" style="width: 10%; float: left; margin-top: 35px">
                    @FileUpload.GetHtml(initialNumberOfFiles: 1, allowMoreFilesToBeAdded: false, includeFormTag: false, addText: "Thêm ảnh", uploadText: "Upload ảnh")
                </td>
                <td class="td" style="width: 34%; float: right; margin-top: 5px">
                </td>
            </tr>
            <tr class="tr" style="background: #eee; border: none">
                <td class="td" style="width: 10%; float: left;">
                    <label>
                        Mô tả ảnh</label>
                </td>
                <td class="td" style="width: 38%; float: left;">
                    @Html.TextArea("moTaAnh", new { @id = "image_description", @rows = "5", @cols = "10", @onclick = "if (this.value=='') this.value=''", @onblur = "if (this.value=='') this.value=''", @style = "width: 100%; color: #000000;" })
                </td>
                <td class="td" style="width: 34%; float: right; margin-top: 5px">
                </td>
            </tr>
            <tr class="tr" style="background: #eee; border: none">
                <td class="td" style="width: 25%; float: left;">
                    &nbsp;
                </td>
                <td class="td" style="width: 10%; float: left;">
                    <a href="#">
                        <input type="submit" id="upload" value="Lưu ảnh" style="padding: 2px 5px" /></a>
                </td>
                <td class="td" style="width: 65%; float: right;">
                    &nbsp;
                </td>
            </tr>
        </tbody>
    </table>
}
}